"""
要求：input:[1,2,3,4] Output:10
"""
def sum_number():
    numbers = []
    while True:
        keyboard_input = input("请输入你的操作：continue or stop")
        if keyboard_input == "stop":
            print("程序已退出")
            break
        else:
            number = float(input("请输入数字："))
            numbers.append(number)
    total_sum = 0
    for i in numbers:
        total_sum += i
    return total_sum


# 调用函数并打印结果
result = sum_number()
print(f"该列表数字之和为：{result}")


